package cn.legend.travel.admin.content.dao.persist.repository.impl;

import cn.legend.travel.admin.content.dao.persist.mapper.GuideDetailMapper;
import cn.legend.travel.admin.content.dao.persist.repository.IGuideDetailRepository;
import cn.legend.travel.admin.content.pojo.entity.GuideDetail;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

@Repository
@RequiredArgsConstructor
public class GuideDetailRepositoryImpl implements IGuideDetailRepository {
    private final GuideDetailMapper mapper;

    @Override
    public int insertDetail(Long id, String content) {
        GuideDetail detail = new GuideDetail();
        detail.setGuideId(id);
        detail.setContent(content);
        return mapper.insert(detail);
    }
}
